package org.jeecg.modules.jxc.sales_management.salelist_Search.controller;

import java.util.List;

import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.jxc.sales_management.salelist_Search.entity.JxcCustomer;
import org.jeecg.modules.jxc.sales_management.salelist_Search.entity.JxcSaleList;
import org.jeecg.modules.jxc.sales_management.salelist_Search.service.IJxcCustomerService;

import lombok.extern.slf4j.Slf4j;

import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.jxc.sales_management.salelist_Search.service.IJxcSaleLisjxcGoodsService;
import org.jeecg.modules.jxc.sales_management.salelist_Search.service.IJxcSaleListService;
import org.jeecg.modules.jxc.sales_management.salelist_Search.service.impl.JxcSaleListServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import io.swagger.annotations.Api;

/**
 * @Description: jxc_customer
 * @Author: jeecg-boot
 * @Date:   2021-12-21
 * @Version: V1.0
 */
@Api(tags="jxc_customer")
@RestController
@RequestMapping("/customer")
@Slf4j
public class JxcCustomerController extends JeecgController<JxcCustomer, IJxcCustomerService> {
	@Autowired
	private IJxcCustomerService jxcCustomerService;

	 @GetMapping("/getComboboxLists")
	 public Result<?> customerLists(){
		 List<JxcCustomer> jxcCustomers = jxcCustomerService.selectCustomer();

		 return  Result.OK(jxcCustomers);
	 }


	 //用户下拉列表
	@PostMapping("/getComboboxList")
	public Result<?> customerList(@RequestParam String contacts){
		List<JxcCustomer> jxcCustomers = jxcCustomerService.selectBycontact(contacts);

		return  Result.OK(jxcCustomers);
	}

 }
